//
//  BaseCellModel.m
//  GoldBook
//
//  Created by wmz on 2021/8/16.
//  Copyright © 2021 wmz. All rights reserved.
//

#import "BaseCellModel.h"

@implementation BaseCellModel

+ (BaseCellModel*)xib:(NSString*)className{
    BaseCellModel *model = BaseCellModel.new;
    model.xib = YES;
    model.cellClass = NSClassFromString(className);
    return model;
}

+ (BaseCellModel*)nomal:(NSString*)className{
    BaseCellModel *model = BaseCellModel.new;
    model.cellClass = NSClassFromString(className);
    return model;
}

+ (instancetype)initTitle:(nullable NSString*)title{
    return [[BaseCellModel alloc]initTitle:title image:nil];
}


+ (instancetype)initTitle:(nullable NSString*)title image:(nullable UIImage*)image{
    return [[BaseCellModel alloc]initTitle:title image:image];
}

+ (instancetype)initTitle:(nullable NSString*)title image:(nullable UIImage*)image imageTitle:(NSString*)imageTitle{
    return [[BaseCellModel alloc]initTitle:title image:image detail:nil imageTitle:imageTitle];
}

- (instancetype)initTitle:(nullable NSString*)title image:(nullable UIImage*)image{
    return [self initTitle:title image:image detail:nil];
}

- (instancetype)initTitle:(nullable NSString*)title detail:(nullable NSString*)detail{
    return [self initTitle:title image:nil detail:detail];
}

- (instancetype)initTitle:(nullable NSString*)title image:(nullable UIImage*)image detail:(nullable NSString*)detail{
    return [self initTitle:title image:image detail:detail imageTitle:nil];
}

- (instancetype)initTitle:(nullable NSString*)title image:(nullable UIImage*)image detail:(nullable NSString*)detail imageTitle:(nullable NSString*)imageTitle{
    if (self = [super init]) {
        self.title = title;
        self.image = image;
        self.detail = detail;
        self.imageTitle = imageTitle;
    }
    return self;
}

- (instancetype)init{
    if (self = [super init]) {
        self.imageSize = CGSizeZero;
        self.numOfLines = 1;
        self.row = 2;
        self.column = 4;
        self.accessoryType = UITableViewCellAccessoryNone;
        self.titleFont = wFontSize(14);
        self.detailFont = wFontSize(14);
        self.titleColor = wColor_3;
        self.detailColor = wColor_detail;
        self.titleWidth = 80;
        self.insets = UIEdgeInsetsZero;
        self.titleBackColor = wColor_white;
        self.enable = YES;
    }
    return self;
}
@end
